<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue使用animate.css库</title>  
    <script src="./vue.js"></script>
    <link rel="stylesheet" type="text/css" href="./animate.css">
    
</head>
<body>
    <div id="root">
        <transition 
            name='fade'
            enter-active-class='animated swing'
            leave-active-class='animated shake'
        >
            <div v-if='show'>Hello World!</div>
        </transition>
        <button @click=handleBtnClick>切换</button>
    </div>
    <script>

        var vm = new Vue({
            el:'#root',
            data:{
                show:true
            },
            methods:{
                handleBtnClick:function(){
                    this.show = !this.show
                }
                }
        })
    </script>
</body>
</html>